﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;

namespace EntertainmentManager.Models
{
    public class Movie : MovieContext
    {
        [Key]
        // [ForeignKey("MovieId")]
        public Guid MovieId { get; set; }
        public string ImdbId { get; set; }

        public string Title { get; set; }
        [DisplayName("Alt Title")]
        public string AltTitle { get; set; }
        public List<string> Genres { get; set; }

        public List<Director> Directors { get; set; }
        public List<Actor> Actors { get; set; }
        public List<Producer> Producers { get; set; }
    }

    public class Producer : Person
    {
        [Key]
        public Guid ProducerId { get; set; }
    }

    public class Director : Person
    {
        [Key]
        public Guid DirectorId { get; set; }
    }

    public class Actor : Person
    {
        [Key]
        public Guid ActorId { get; set; }
    }

    public class MovieContext : DbContext
    {
        public DbSet<Movie> Movies { get; set; }

        public MovieContext()
            : base("MovieContext")
        {

        }
    }
}